package com.lxy.seata.controller;

import com.lxy.seata.service.TStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lixinyang
 * @className: TStorageController
 * @description: TODO
 * @date 2022/05/02日  23:06
 */

@RestController
public class TStorageController {

    @Autowired
    private TStorageService tStorageService;

    @PostMapping("/stroage/decrease")
    public int decrease(Long productId, Integer count){
        int decrease = tStorageService.decrease(productId, count);
        return decrease;
    }

}
